import { IRouteComponentProps } from '@umijs/renderer-react';
import { CommonHeader, CommonTabs } from '@/components';
import { request } from 'umi';
import styles from './index.less';

export default function Layouts(props: IRouteComponentProps) {
  const h = window.innerHeight;

  // 请求示例
  /* request('/test/postReq', {
    method: 'post',
    params: {
      a:1,
      b:2
    }
  })

  request('/test/getReq', {
    method: 'get',
    params: {
      a:1,
      b:2
    }
  }) */

  return (
    <div className={styles.layoutContainer} style={{ height: `${h}px` }}>
      {/* <div className={styles.tab}>
        <CommonTabs currentRoutes={window.location.href} />
      </div> */}
      {props.children}
    </div>
  );
}
